Repository navigation
refactor(advisor): adopt AdvisorDecision scenario, compact scoped tools, and decompose cycle coordinator - #25
Merged
Conversation
…ls, and decompose cycle coordinator refactor(advisor): split cycle coordinator and delegate parsing to Core APIs Extract direct execution, approval submission, tool-call formatting, and mote presentation out of AdvisorCycleCoordinator into focused collaborators (AdvisorDirectExecutionHandler, ApprovalSubmissionPipeline, ToolCallSummaryFormatter, AdvisorMotePresenter), shrinking the coordinator to orchestration only. Delegate LLM output cleaning, JSON extraction/repair, pseudo-function-call parsing, reason extraction, mote wrapping, and translation fallbacks to the new Core facade APIs (RimMindAPI.Json/Text/ToolSet/Bus/Request/MainThreadSnapshot), removing duplicated logic from Advisor. Register a dedicated AdvisorDecision scenario so Advisor context providers no longer collide with Core's agent_decision, and route context reads through MainThreadSnapshot. Scope tool definitions via AdvisorDefaultScope with compact schemas, and omit tool definitions on round-2 feedback to cut token usage. Replace the plain-text tool dump in the L3 actions_list with concise native Tool Calling guidance, update prompt strings (EN/ZH) to reflect schema-driven arguments and approval autonomy, and drop hardcoded action IDs from colony bottleneck text. Add WorldScopedComponentCache-backed history store with reset hooks and expand tests/stubs accordingly.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Switches strictly to ScenarioIds.AdvisorDecision with compact scoped tools on R1 and tool-free R2; aligns EN/ZH L0 prompts; wraps async context providers with MainThreadSnapshot; removes actions_* hardcoding from ColonyMacroPerceiver; decomposes AdvisorCycleCoordinator into ApprovalSubmissionPipeline, AdvisorDirectExecutionHandler, ToolCallSummaryFormatter, and AdvisorMotePresenter; adopts Core Json/Settings/Cache/Risk helpers. Verified with 48/48 tests and live playthrough (-65.3% Advisor tokens/call).